import {post, get} from './http'
// 用户相关api
export let regist = (params) => post('/user/regist', params) // 注册api
export let login = (params) => post('/user/login', params) // 登录api
export let loginout = (params) => post('/user/loginout', params) // 登出api
export let getUserDetail = (params) => post('/user/getUserDetail', params) // 获得用户详细信息
export let getUserDongTai = (params) => post('/user/getUserDongTai', params) // 获得用户自己发布的动态
export let addAddress = (params) => post('/user/addaddress', params) // 添加地址
export let getAddress = (params) => post('/user/getaddress', params) // 获取收货地址
export let addOrder = (params) => post('/user/addorder', params) // 添加订单
export let getFans = (params) => post('/user/getFansList', params) // 获取粉丝列表
export let getGuanZhu = (params) => post('/user/getGuanZhuList', params) // 获取关注列表
export let addGuanZhu = (params) => post('/user/addguanzhu', params) // 关注某个用户
export let cancelGuanZhu = (params) => post('/user/cancelguanzhu', params) // 取消关注某个用户
export let delSelfDongTai = (params) => post('/user/delSelfDongTai', params) // 删除用户的自己动态，根据动态id
export let test = (params) => get('/cms/category/info', params) // 测试

// 首页
export let getRecommendData = (params) => post('/home/getRecommendData', params) // 获得根据场景获得首页数据
export let getFindData = (params) => post('/getFindData', params) // 根据场景获得发现页数据
export let addDianZan = (params) => post('/addDianzan', params) // 点赞
export let cancelDianZan = (params) => post('/cancelDianzan', params) // 取消点赞
export let addShouChang = (params) => post('/addShouChang', params) // 收藏
export let cancelShouChang = (params) => post('/cancelShouChang', params) // 取消收藏
export let getDianZan = (params) => post('/getDianZan', params) // 获得动态的点赞数据
export let getPinLun = (params) => post('/getPinlun', params) // 获得动态的评论数据
export let setPinLun = (params) => post('/addPinlun', params) // 发表评论
// 欢迎页面
export let getLanuch = (params) => post('/getlaunchimg', params) // 获得启动图

// 管理员需要的
export let getAllUser = (params) => get('/admin/getAllUser', params) // 获得所有用户
export let getCountUser = () => get('/admin/getCoutUser') // 获得有多少条用户
export let delUserById = (params) => post('/admin/delUser', params) // 根据id删除用户
